<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="internals2.counter.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="internals2.counter.examples.html">范例</a></div>
 <div class="up"><a href="internals2.counter.html">&quot;counter&quot; 扩展 - 一个连续的实例</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="internals2.counter.constants" class="appendix">
   <h1>预定义常量</h1>

   <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>

   <dl>

    
     <dt>

      <strong><code>COUNTER_FLAG_PERSIST</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       有此标志的计数器会作为持久化资源进行创建。
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_FLAG_SAVE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       有此标志的计数器会在启动 PHP 间保存。
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_FLAG_NO_OVERWRITE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       此标志触发 <span class="function"><a href="internals2.counter.function.counter-create.html" class="function">counter_create()</a></span>
       函数以避免覆盖一个名称已存在的计数器而创建一个新的。
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_META_NAME</code></strong>
      (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       传递此常量以获取计数器资源/对象的名称。
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_META_IS_PERISTENT</code></strong>
      (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       传递此常量来指定计数器资源/对象进行持久化
       (有 <strong><code>COUNTER_FLAG_PERSIST</code></strong> 标志)
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_RESET_NEVER</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       此计数器不会被重置。
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_RESET_PER_LOAD</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       此计数器每次启动 PHP 时都会被重置。
      </span>
     </dd>

    
    
     <dt>

      <strong><code>COUNTER_RESET_PER_REQUEST</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
     </dt>

     <dd>

      <span class="simpara">
       此计数器每次请求时都会被重置。
      </span>
     </dd>

    
   </dl>

  </div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="internals2.counter.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="internals2.counter.examples.html">范例</a></div>
 <div class="up"><a href="internals2.counter.html">&quot;counter&quot; 扩展 - 一个连续的实例</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
